package com.lzy.pattern.singleton.demo3;

/**
 * @ClassName: Client
 * @Description: 单例设计模式测试：懒汉式，线程不安全
 * @Author: LiuZy
 * @Date: 2022/4/9 19:32
 * @Version: 1.0
 */
public class Client {

    public static void main(String[] args) {

        for (int i = 0; i < 100; i++) {
            new Thread(new Runnable() {
                @Override
                public void run() {
                    Singleton instance = Singleton.getInstance();
                    System.out.println(instance.hashCode());
                }
            }).start();
        }
    }
}